const obj = {
    a:1,
    b:1
}
function test(fn1){
    console.log(fn1 ,this)
    return 'test返回值'
}

Function.prototype.myApply = function(ctx){
    const argu = arguments[1]
    const pointer = ctx ? Object(ctx): window
    pointer.__proto__.fn = this
    const ret = pointer.fn(argu)
    delete pointer.__proto__.fn
    return ret
}
console.log(test.myApply(obj,['参数1','参数2']))